<?php
	if($id = intval($_GET['uid'])):
		$user = $_->users->_select(array('nickname','email','phone','level','addtime','logintime','status'),array('id'=>$id));
		$inf = $user[0];
		$user = array('status'=>$inf['status'],'logintime'=>$inf['status']);
	else:
		$_COOKIE['_sid']?session_id($_COOKIE['_sid']):'';
		session_start();
		$inf = $_SESSION['userinfo'];
	endif;
	cookie(array('_url'=>thisUrl()),$time = 3600);
	if($inf && (time()-$_COOKIE['_time']) < OUTTIME):
		cookie(array('_time'=>time()),$time = 3600);
		$user = $_->users->_select(array('logintime','status'),array('email'=>$inf['email']));
		$user = $user[0];
		$user['status']=='2'?die('此账号已被管理员禁用，如有疑问请与管理员联系.'):($inf['password']?($user['logintime']!=$inf['logintime']?die('登录超时，请重新登录.'):''):'');
	else:
		header('location:http://pic.dev/login.php');exit;
	endif;

?>